z-test

two-means


Before you can use the z test to test the difference between two independent sample means, you must make sure that the following assumptions are met.

Assumptions for z-test difference of means

  • Both samples are random samples
  • The samples must be independent of each other. That is, there can be no relationship between the subjects in each sample
  • The standard deviations of both populations must be known; and if the sample sizes are less than 30, the populations must be normally or approximately normally distributed.

The Formula for \(z\)-test comparing 2 means:

\[z=\frac{\Big(\overline{x}_1-\overline{x}_2\Big)-\Big(\mu_1-\mu_2\Big)}{\sqrt{\frac{\sigma_1^2}{n_1}+\frac{\sigma_2^2}{n_2}}}\]